﻿#region Usings

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Omu.Awesome.Core;
using XPressify.Data;

#endregion

namespace XPressify.Models
{
    public class GroupModel
    {
        public Guid SubjectId { get; set; }
        public Group Group { get; set; }
        public bool IsAdmin { get; set; }
        public bool IsMember { get; set; }
        public User Administrator { get; set; }
        public Guid CurrentUserId { get; set; }
    }

    public class SuggestedMemebers
    {
        public Guid Id { get; set; }
        public string FullName { get; set; }
        public bool Selected { get; set; }
        public string ProfilePicturePath { get; set; }
    }

    public class GroupMembersModel : Pageable<SuggestedMemebers>
    {
        public Guid GroupId { get; set; }
        public Guid CurrentUserId { get; set; }
        public SuggestedMemebers[] Members { get; set; }
    }

    public class InviteGroupModel
    {
        public Guid GroupId { get; set; }

        public SuggestedMemebers[] UsersToSuggest { get; set; }

        public Guid CurrentUserId { get; set; }

        [Required]
        public IEnumerable<Guid> UsersSelected { get; set; }
    }

    public class CreateGroupModel
    {
        [Required]
        [Display(Name = "Name")]
        public string Name { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Display(Name = "Username")]
        public string Username { get; set; }

        [Required]
        [Display(Name = "Privacy type")]
        public string Privacy { get; set; }
    }

    public class DeleteGroupModel
    {
        [Display(Name = "Name")]
        public string Name { get; set; }

        public Guid GroupId { get; set; }
    }

    public class EditGroupModel
    {
        [Required]
        [Display(Name = "Name")]
        public string Name { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Display(Name = "Username")]
        public string Username { get; set; }

        [Required]
        [Display(Name = "Privacy type")]
        public string Privacy { get; set; }

        public Guid GroupId { get; set; }
    }

    public class DetailsGroupModel
    {
        [Display(Name = "Name")]
        public string Name { get; set; }

        [Display(Name = "Description")]
        public string Description { get; set; }

        [Display(Name = "Username")]
        public string Username { get; set; }

        [Display(Name = "Created")]
        public DateTime Created { get; set; }

        public Guid SubjectId { get; set; }

        public bool IsAdministrator { get; set; }

        public Guid GroupId { get; set; }

        public bool AdministratorBlocked { get; set; }

        public User Administrator { get; set; }

        public bool IsMemeber { get; set; }

        public string CurrentUserProfilePicturePath { get; set; }

        public Dictionary<Post, List<Post>> AllPosts { get; set; }

        public bool HasCoverPictureAlbum { get; set; }

        public string WallAlbumCoverPicturePath { get; set; }

        public short GroupPrivacyType { get; set; }

        public Guid WallAlbumId { get; set; }

        public User CurrentUser { get; set; }
    }

}